<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<#include "/include/head_common.html"> 
<#include "/include/tree_table.html">
<title>区域管理</title>
<script type="text/javascript">
$(document).ready(function() {
	//根据tr的pId进行treeTable的操作
	$("#treeTable").treeTable({
		expandLevel : 5
	}).show();
});
</script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="list">区域列表</a></li>
    <li><a href="edit">区域添加</a></li>
</ul>
<#include "/include/message.html">
<table id="treeTable" class="table table-striped table-bordered table-condensed">
    <thead>
    	<tr>
        	<th>区域名称</th>
        	<th>操作</th>
        	<th>区域编码</th>
        	<th>区域类型</th>
        	<th>备注</th>
        </tr>
    </thead>
		<tbody>
			<#list list as area>
			<tr id="${area.id}"
				pId="<#if area.parentId!='0'>${area.parentId!''}<#else>0</#if>">
				<td><a href="edit?id=${area.id!''}">${area.name!''}</a></td>
				<td><a href="edit?id=${area.id!''}">修改</a> <a
					href="delete?id=${area.id!''}"
					onclick="return confirmx('要删除该区域及所有子区域项吗？', this.href)">删除</a> <a
					href="edit?parentId=${area.parentId!''}">添加下级区域</a></td>
				<td>${area.code!''}</td>
				<td>${area.type!''}</td>
				<td>${area.remarks!''}</td>
			</tr>
			</#list>
		</tbody>
	</table>
</body>
</html>